1. Technical Field
This invention generally relates to computer systems and more specifically relates to an apparatus and method for communicating between computer systems.
2. Background Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices that may be found in many different settings. Computer systems typically include a combination of hardware (e.g., semiconductors, circuit boards, etc.) and software (e.g., computer programs). As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Many modern computer systems are a complex combination of different hardware and software that are interconnected on a network. Numerous different systems have evolved for computers on a network to exchange data. For example, known network protocols establish the manner for computers to exchange data. One example of a known network communication protocol is Transmission Control Protocol/Internet Protocol, known more commonly as TCP/IP. TCP/IP defines a protocol for transmitting packets of data between two computer systems on a network. However, the data packets (referred to herein as datastreams) must still be interpreted in order to be useful. In a typical network computer system, there is one computer system that serves as a network server, and many other computer systems that are clients that need to exchange data with the server. In order for the server and client to communicate, each needs to have a transmit and receive mechanism that adheres to a predetermined specification. Referring to FIG. 1, a prior art networked computer system 100 includes a client computer system 110 that has a datastream processor 130 for processing datastreams according to a hard-coded datastream specification 150. Networked computer system 100 also includes a server computer system 120 that has a datastream processor 140 for processing datastreams according to the same hard-coded datastream specification 150. The hard-coded datastream specification 150 defines a predetermined format for datastreams 190 that are transmitted between client 110 and server 120. Datastream 190 may include numerous different types of fields, including control fields 192, data fields 194, and status fields 196.
When client 110 has a request for server 120, client 110 formats a datastream 190 with appropriate fields to perform the request according to the hard-coded datastream specification 150, and sends the request to server 120. When server 120 receives the datastream 190, it decodes the datastream according to the hard-coded datastream specification 150, and performs appropriate processing according to the request. If server 120 needs to reply to the request, it encodes another datastream 190 with the reply information according to the hard-coded datastream specification 150.
The prior art methods for communicating between computer systems requires that both the client and the server have knowledge of the datastream specification. Should the datastream specification change, both the client and server software has to be modified to accommodate the change. This prior art arrangement makes code maintenance very difficult, especially in large-scale networks with many servers and a large number of clients. Any change to the datastream specification requires a corresponding change to all servers and clients. This fact alone results in significant cost when changing the datastream specification. Without a method for updating a datastream specification to allow enhanced communications between computer systems on a network without requiring corresponding changes on each computer system on the network, the cost of providing new communication capabilities on a network computer system will be excessive.
According to the preferred embodiments, two computer systems communicate with each other using active datastreams that each identify executable code for sending and receiving the corresponding active datastream, and for performing any processing required by the active datastream. Each active datastream also includes a unique datastream identifier. When a first computer system (source) has a request to send to a second computer system (target), the source computer system creates an active datastream object that represents the request. Once the active datastream object is created, a method on the active datastream object is invoked to send the active datastream object to the target. A datastream factory on the target reads the datastream identifier of the transmitted active datastream object, determines from the datastream identifier the class corresponding to the type of active datastream object being received, and creates a new instance of the class corresponding to the datastream identifier. A datastream receive mechanism on the target is a method on the new instance, which is invoked to cause the instance to populate itself from the active datastream object received from the source. Logic for replying to the request may also be provided as one or more methods defined on the active datastream class.
The foregoing and other features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings.